package com.jimikongjian.service.base;

import com.jimikongjian.models.ResponseMessage;
import com.jimikongjian.models.UnreadComment;

/**
 * Created by fuxiuyang on 17/3/15.
 */
public interface IUnreadCommentService {

    /**
     * 创建未读评论
     * @param unreadComment
     * @return
     */
    public ResponseMessage createUnreadComment(UnreadComment unreadComment);


    /**
     * 通过用户的id号查询未读信息
     * @param userId
     * @return
     */
    public ResponseMessage selectUnreadCommentByUserId(int userId, int start, int length);


    /**
     * 查询数据库中是否含有该未读评论信息
     * @param userId
     * @return
     */
    public boolean hasUnreadComment(int userId, int articleId);


    /**
     * 更新未读评论的条数
     * @param id
     */
    public ResponseMessage updateUnreadCommentById(int id);


    /**
     * 更新未读评论的条数
     * @param articleId
     */
    public void updateUnreadCommentByArticleId(int articleId);


    /**
     * 删除某一未读评论
     * @param unreadComment
     * @return
     */
    public ResponseMessage deleteUnreadComment(UnreadComment unreadComment);
}
